%PUT BUILDING TABLE 5 FOR &TITLE2....;

PROC UNIVARIATE DATA=OUT.&COM; CLASS WAREHS;
	VAR LNAMT;
	OUTPUT OUT=PCTLS PCTLPTS=1 TO 100 BY 1 PCTLPRE=AMT PCTLNAME=PT1-PT100;
PROC PRINT DATA=PCTLS;
	TITLE "SIZE COMPARISONS";
	TITLE2 "&TITLE2";
RUN;

PROC EXPORT DATA=PCTLS OUTFILE=OUTPCTLS
	DBMS=EXCEL REPLACE;
	SHEET=%LOOKUP(&COM);	
RUN;
